package com.example.springboot.bean;

import javax.persistence.*;

/**
 * Created by tang on 2018/3/8.
 */
@Entity
@Table(name = "book_product_records")
public class ProductRecord {
    private int id;
    private String bookName;
    private int storeNum;
    private double bookPrice;

    public ProductRecord() {
    }

    public ProductRecord(String bookName, int storeNum, double bookPrice) {
        this.bookName = bookName;
        this.storeNum = storeNum;
        this.bookPrice = bookPrice;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(name = "book_name")
    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    @Column(name = "store_num")
    public int getStoreNum() {
        return storeNum;
    }

    public void setStoreNum(int storeNum) {
        this.storeNum = storeNum;
    }

    @Column(name = "book_price")
    public double getBookPrice() {
        return bookPrice;
    }

    public void setBookPrice(double bookPrice) {
        this.bookPrice = bookPrice;
    }

    @Override
    public String toString() {
        return "ProductRecord{" +
                "id=" + id +
                ", bookName='" + bookName + '\'' +
                ", storeNum=" + storeNum +
                ", bookPrice=" + bookPrice +
                '}';
    }
}
